package com.insigma.business.qrcode.common.vo;

import java.util.LinkedHashMap;
import java.util.Map;


public enum UserTypeEnum implements DescEnum {

    
    SERVANT("平台管理员"),

    
    SOLDIER("军人"),

    
    GOV_EMPLOYEE("政府人员"),

    
    GOV_EMP_STATION("服务站人员"),

    
    GOV_EMP_CENTER("服务中心人员"),

    
    COMPANY_USER("企业用户"),

    
    MERCHANT_USER("商家端"),

    MERCHANT_USER_WAIT("商家端-申请中"),

    MERCHANT_USER_REJECT("商家端-驳回"),

    MERCHANT_USER_OUT("商家端-退出"),

    MERCHANT_USER_OUT_WAIT("商家端-退出申请中"),

    ENGINE_SCHEDULER("调度中心-引擎"),

    
    ENGINE("引擎"),
    
    OPEN("外部"),

    
    XXJ("信息机")
    ;

    
    private String desc;

    UserTypeEnum(String desc) {
        this.desc = desc;
    }

    
    public static UserTypeEnum getByEnumName(final String enumName) {
        for (UserTypeEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String, String> getName2TitleMap() {

        Map<String, String> name2TitleMap = new LinkedHashMap<>();

        for (UserTypeEnum element : values()) {
            name2TitleMap.put(element.name(), element.desc);
        }

        return name2TitleMap;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }

}
